package doublelink;

public class Test {
    public static void main(String[] args) {
        DoubleLinkedList doubleLinkedList = new DoubleLinkedList();
//        doubleLinkedList.addFirst(1);
//        doubleLinkedList.addLast(20);
//        doubleLinkedList.addLast(30);
//        doubleLinkedList.addIndex(1,5);
//        doubleLinkedList.addIndex(2,10);
////        1->5->10->20->30
//        System.out.println(doubleLinkedList);
//        doubleLinkedList.removeFirst();
//        doubleLinkedList.removeLast();
//        System.out.println(doubleLinkedList);
//        doubleLinkedList.removeIndex(1);
////        5->20
//        System.out.println(doubleLinkedList);
        doubleLinkedList.addLast(5);
        doubleLinkedList.addFirst(5);
        doubleLinkedList.addFirst(5);
        doubleLinkedList.addFirst(5);
        doubleLinkedList.addFirst(2);
//        2->5->5->5->5
        System.out.println(doubleLinkedList);
        doubleLinkedList.removeValOnce(5);
//        2->5->5->5
        System.out.println(doubleLinkedList);
        doubleLinkedList.removeValAll(5);
//        2
        System.out.println(doubleLinkedList);
    }
}
